Repository navigation
Build/Test Tools: Wait for maintenance mode to end in E2E tests. - #15727
adimoldovan wants to merge 2 commits into
Conversation
The maintenance spec deletes the lock file from the host. On macOS, the Docker file share can show the file as present for about a second after that, and the next spec fails with a require() warning. The spec now waits until the home page loads without this error. See #66455.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
lancewillett
left a comment
There was a problem hiding this comment.
Looks good. The spec that breaks the site now waits until the site works again, so the next spec starts clean. The loop also covers the case where the lock file still shows up, since that page returns a 503.
CI at 0e2e7ad passed all 72 serial tests in both jobs. I didn't reproduce the macOS file share timing myself.
One parallel test passed only on retry in this run: the "0" case of the invalid-timezone spec. It's not from this change. I've added a note on #15709.
AI review · claude-opus-5-5
The maintenance mode spec deletes the `.maintenance` file from the host. With a Docker file share on macOS, the file can still show as present for about a second. In that time, `file_exists()` passes in `wp_is_maintenance_mode()`, the `require` fails, and the first tests of the next spec fail. The spec now waits until the home page loads without that error before it ends. It fails if the site does not recover within 10 seconds. Follow-up to [58430]. Developed in: #15727 Props adrianmoldovanwp. See #66455. git-svn-id: https://develop.svn.wordpress.org/trunk@65311 602fd350-edb4-49c9-b593-d223f7449a82
The maintenance mode spec deletes the `.maintenance` file from the host. With a Docker file share on macOS, the file can still show as present for about a second. In that time, `file_exists()` passes in `wp_is_maintenance_mode()`, the `require` fails, and the first tests of the next spec fail. The spec now waits until the home page loads without that error before it ends. It fails if the site does not recover within 10 seconds. Follow-up to [58430]. Developed in: WordPress/wordpress-develop#15727 Props adrianmoldovanwp. See #66455. Built from https://develop.svn.wordpress.org/trunk@65311 git-svn-id: http://core.svn.wordpress.org/trunk@64451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
PR #15727 landed in https://core.trac.wordpress.org/changeset/65311 |
Trac ticket: https://core.trac.wordpress.org/ticket/66455
On macOS, the first 3 tests in
media-library-client-side-upload.test.jsfail when the spec runs right aftermaintenance-mode.test.js:The maintenance spec deletes
.maintenancefrom the host. For about a second after that, the Docker file share can show the file as present. In that time,file_exists()passes andrequirefails inwp_is_maintenance_mode().This failure does not occur in CI. The
serialjobs in the last 3 trunk runs passed all 72 tests, with no such warning. CI runs Docker directly on Ubuntu, so the containers use the host's file system with no file share between them. I did not measure file timing on Linux.The maintenance spec now waits until the home page loads without this error. The next spec then starts on a working site. If the page does not recover within 10 seconds, the maintenance spec fails.
Testing Instructions
npm run test:e2e -- specs/maintenance-mode specs/media-library-client-side-upload --project=serial.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Root cause investigation, the test change, and this description.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.